//
//  SGExploerSearchBar.swift
//  songguo
//
//  Created by 潘传洲 on 16/6/17.
//  Copyright © 2016年 pcz. All rights reserved.
//

import UIKit

class SGExploerSearchBar: UISearchBar {

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.frame = frame
        self.placeholder = "搜索松果";
        self.tintColor = globalColor
        self.searchBarStyle = .Minimal
        self.setImage(UIImage(named: "search_bar_icon_16x16_"), forSearchBarIcon: .Search, state: .Normal)
        
        let searchField = self.valueForKeyPath("searchField") as! UITextField
        searchField.clearButtonMode = .Never
        searchField.textColor = globalColor
        searchField.setValue(globalColor, forKeyPath: "placeholderLabel.textColor")
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
